package com.geek.framework.study.config.microprofile.source;

import com.geek.framework.study.config.microprofile.enums.ConfigSourceEnum;

import java.util.Map;


public class JavaSystemEnvironmentConfigSource extends MapBaseConfigSource {
    public JavaSystemEnvironmentConfigSource() {
        super(ConfigSourceEnum.JAVA_CONFIG.getName(), ConfigSourceEnum.JAVA_CONFIG.getOrdinal());
    }

    @Override
    protected void prepareConfigData(Map<String, String> configData) {
        System.getProperties().forEach((k,v)->{
            configData.put(String.valueOf(k), String.valueOf(v));
        });
    }
}
